home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.dlr.de!news
- From: Matthias Sodomann <Matthias.Sodomann@dlr.de>
- Subject: Help! How do I reset a ifstream file-pointer to beginning?
- X-Nntp-Posting-Host: ws01.sr.kp.dlr.de
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <311734E8.41C6@dlr.de>
- Sender: news@news.dlr.de
- Content-Transfer-Encoding: 7bit
- Organization: DLR
- Mime-Version: 1.0
- Date: Tue, 6 Feb 1996 11:00:56 GMT
- X-Mailer: Mozilla 2.0b6a (X11; I; AIX 2)
-
- Hi there,
-
- I have a question concerning ifstream operation. I like to read a file.
- It is ASCII. I got me an ifstream in; and opened the file with
- in.open("filename",ios::in); So far so good. I read the whole file, and
- after this I have to read it again. The reason doesn't matter! How do I
- reset the file to start reading from the beginning WITHOUT closing and
- reopening it? I tried to use in.seekg(0); or in.seekg(0,ios:beg); but
- all this didn't help. What do I have to do? Or is this maybe a matter of
- compiler? I work on a IBM RS600 AIX3.2 Workstation with the IBM C++
- Compiler xlC.
-
-
- I hope, and think, it is an easy problem.
-
- ThanX for reading this. Please give me some advice.
-
- Matthias
- --
-
- ========================================================================
- | Matthias Sodomann | Phone: (+49)2203-601-2928 |
- | DLR | FAX: (+49)2203-68309 |
- | Linder Hoehe 90 | E-mail: Matthias.Sodomann@dlr.de |
- |D-51147 Koeln | InterNet / WWW: http://dv.kp.dlr.de/~sodomann |
- | Germany | anonymous ftp: 129.247.108.3 |
- ========================================================================
- | |
- | _/_/_/ _/ _/_/_/ //| |
- | _/ _/ _/ _/ _/ ___// |___ |
- | _/ _/ _/ _/_/_/_/ //___/ /__// |
- | _/ _/ _/ _/ _/ || / |
- | _/_/_/ _/_/_/_/ _/ _/ ||/ |
- | |
- ========================================================================
-